<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //arr.sort() 传入函数，数组元素排序
    //arr.reverse() 对数组进行反序处理
    var arr= [3, 2, 1, 5, 7, 15];
    var arr1 = arr.sort(function(a, b) {
        return a-b;
    });
    console.log(arr1.reverse());
</script>
</html>